<?php
$tdatatbl_loai_tin_tuc=array();
	$tdatatbl_loai_tin_tuc[".NumberOfChars"]=80; 
	$tdatatbl_loai_tin_tuc[".ShortName"]="tbl_loai_tin_tuc";
	$tdatatbl_loai_tin_tuc[".OwnerID"]="";
	$tdatatbl_loai_tin_tuc[".OriginalTable"]="tbl_loai_tin_tuc";


	
//	field labels
$fieldLabelstbl_loai_tin_tuc = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelstbl_loai_tin_tuc["English"]=array();
	$fieldToolTipstbl_loai_tin_tuc["English"]=array();
	$fieldLabelstbl_loai_tin_tuc["English"]["id"] = "Id";
	$fieldToolTipstbl_loai_tin_tuc["English"]["id"] = "";
	$fieldLabelstbl_loai_tin_tuc["English"]["ten_loai_tin_tuc"] = "Ten Loai Tin Tuc";
	$fieldToolTipstbl_loai_tin_tuc["English"]["ten_loai_tin_tuc"] = "";
	if (count($fieldToolTipstbl_loai_tin_tuc["English"])){
		$tdatatbl_loai_tin_tuc[".isUseToolTips"]=true;
	}
}


	
	$tdatatbl_loai_tin_tuc[".NCSearch"]=true;

	

$tdatatbl_loai_tin_tuc[".shortTableName"] = "tbl_loai_tin_tuc";
$tdatatbl_loai_tin_tuc[".nSecOptions"] = 0;
$tdatatbl_loai_tin_tuc[".recsPerRowList"] = 1;	
$tdatatbl_loai_tin_tuc[".tableGroupBy"] = "0";
$tdatatbl_loai_tin_tuc[".mainTableOwnerID"] = "";
$tdatatbl_loai_tin_tuc[".moveNext"] = 1;




$tdatatbl_loai_tin_tuc[".showAddInPopup"] = false;

$tdatatbl_loai_tin_tuc[".showEditInPopup"] = false;

$tdatatbl_loai_tin_tuc[".showViewInPopup"] = false;


$tdatatbl_loai_tin_tuc[".fieldsForRegister"] = array();

$tdatatbl_loai_tin_tuc[".listAjax"] = false;

	$tdatatbl_loai_tin_tuc[".audit"] = false;

	$tdatatbl_loai_tin_tuc[".locking"] = false;
	
$tdatatbl_loai_tin_tuc[".listIcons"] = true;
$tdatatbl_loai_tin_tuc[".edit"] = true;
$tdatatbl_loai_tin_tuc[".inlineEdit"] = true;
$tdatatbl_loai_tin_tuc[".view"] = true;

$tdatatbl_loai_tin_tuc[".exportTo"] = true;

$tdatatbl_loai_tin_tuc[".printFriendly"] = true;

$tdatatbl_loai_tin_tuc[".delete"] = true;

$tdatatbl_loai_tin_tuc[".showSimpleSearchOptions"] = false;

$tdatatbl_loai_tin_tuc[".showSearchPanel"] = true;


$tdatatbl_loai_tin_tuc[".isUseAjaxSuggest"] = true;

$tdatatbl_loai_tin_tuc[".rowHighlite"] = true;


// button handlers file names

$tdatatbl_loai_tin_tuc[".addPageEvents"] = false;

$tdatatbl_loai_tin_tuc[".arrKeyFields"][] = "id";

// use datepicker for search panel
$tdatatbl_loai_tin_tuc[".isUseCalendarForSearch"] = false;

// use timepicker for search panel
$tdatatbl_loai_tin_tuc[".isUseTimeForSearch"] = false;

$tdatatbl_loai_tin_tuc[".isUseiBox"] = false;


$tdatatbl_loai_tin_tuc[".useDetailsPreview"] = true;	

$tdatatbl_loai_tin_tuc[".isUseInlineAdd"] = true;

$tdatatbl_loai_tin_tuc[".isUseInlineEdit"] = true;
$tdatatbl_loai_tin_tuc[".isUseInlineJs"] = $tdatatbl_loai_tin_tuc[".isUseInlineAdd"] || $tdatatbl_loai_tin_tuc[".isUseInlineEdit"];

$tdatatbl_loai_tin_tuc[".allSearchFields"] = array();

$tdatatbl_loai_tin_tuc[".globSearchFields"][] = "ten_loai_tin_tuc";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("ten_loai_tin_tuc", $tdatatbl_loai_tin_tuc[".allSearchFields"]))
{
	$tdatatbl_loai_tin_tuc[".allSearchFields"][] = "ten_loai_tin_tuc";	
}


$tdatatbl_loai_tin_tuc[".googleLikeFields"][] = "id";
$tdatatbl_loai_tin_tuc[".googleLikeFields"][] = "ten_loai_tin_tuc";



$tdatatbl_loai_tin_tuc[".advSearchFields"][] = "id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("id", $tdatatbl_loai_tin_tuc[".allSearchFields"])) 
{
	$tdatatbl_loai_tin_tuc[".allSearchFields"][] = "id";	
}
$tdatatbl_loai_tin_tuc[".advSearchFields"][] = "ten_loai_tin_tuc";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("ten_loai_tin_tuc", $tdatatbl_loai_tin_tuc[".allSearchFields"])) 
{
	$tdatatbl_loai_tin_tuc[".allSearchFields"][] = "ten_loai_tin_tuc";	
}

$tdatatbl_loai_tin_tuc[".isTableType"] = "list";


	

$tdatatbl_loai_tin_tuc[".isDisplayLoading"] = true;

$tdatatbl_loai_tin_tuc[".isResizeColumns"] = false;

	$tdatatbl_loai_tin_tuc[".subQueriesSupAccess"] = true;




$tdatatbl_loai_tin_tuc[".pageSize"] = 20;

$gstrOrderBy = "";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdatatbl_loai_tin_tuc[".strOrderBy"] = $gstrOrderBy;
	
$tdatatbl_loai_tin_tuc[".orderindexes"] = array();

$tdatatbl_loai_tin_tuc[".sqlHead"] = "SELECT id,  ten_loai_tin_tuc";
$tdatatbl_loai_tin_tuc[".sqlFrom"] = "FROM tbl_loai_tin_tuc";
$tdatatbl_loai_tin_tuc[".sqlWhereExpr"] = "";
$tdatatbl_loai_tin_tuc[".sqlTail"] = "";




//fill array of records per page for list and report without group fields
$arrRPP = array();
$arrRPP[] = 10;
$arrRPP[] = 20;
$arrRPP[] = 30;
$arrRPP[] = 50;
$arrRPP[] = 100;
$arrRPP[] = 500;
$arrRPP[] = -1;
$tdatatbl_loai_tin_tuc[".arrRecsPerPage"] = $arrRPP;

//fill array of groups per page for report with group fields
$arrGPP = array();
$arrGPP[] = 1;
$arrGPP[] = 3;
$arrGPP[] = 5;
$arrGPP[] = 10;
$arrGPP[] = 50;
$arrGPP[] = 100;
$arrGPP[] = -1;
$tdatatbl_loai_tin_tuc[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "id";
	$tdatatbl_loai_tin_tuc[".Keys"] = $tableKeys;

//	id
	$fdata = array();
	$fdata["strName"] = "id";
	$fdata["ownerTable"] = "tbl_loai_tin_tuc";
		$fdata["Label"]="Id"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		$fdata["AutoInc"]=true;
	
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "id";
	
		$fdata["FullName"]= "id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		
		
		
		
		
		
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				
		
				
		
		
		
			$tdatatbl_loai_tin_tuc["id"]=$fdata;
//	ten_loai_tin_tuc
	$fdata = array();
	$fdata["strName"] = "ten_loai_tin_tuc";
	$fdata["ownerTable"] = "tbl_loai_tin_tuc";
		$fdata["Label"]="Ten Loai Tin Tuc"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "ten_loai_tin_tuc";
	
		$fdata["FullName"]= "ten_loai_tin_tuc";
	
		
		
		
		
		
				$fdata["Index"]= 2;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=200";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatatbl_loai_tin_tuc["ten_loai_tin_tuc"]=$fdata;

	
$tables_data["tbl_loai_tin_tuc"]=&$tdatatbl_loai_tin_tuc;
$field_labels["tbl_loai_tin_tuc"] = &$fieldLabelstbl_loai_tin_tuc;
$fieldToolTips["tbl_loai_tin_tuc"] = &$fieldToolTipstbl_loai_tin_tuc;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["tbl_loai_tin_tuc"] = array();
$dIndex = 1-1;
			$strOriginalDetailsTable="tbl_tin_tuc";
	$detailsTablesData["tbl_loai_tin_tuc"][$dIndex] = array(
		  "dDataSourceTable"=>"tbl_tin_tuc"
		, "dOriginalTable"=>$strOriginalDetailsTable
		, "dShortTable"=>"tbl_tin_tuc"
		, "masterKeys"=>array()
		, "detailKeys"=>array()
		, "dispChildCount"=> "1"
		, "hideChild"=>"0"
		, "sqlHead"=>"SELECT tbl_tin_tuc.id,  tbl_tin_tuc.tieu_de_tin_tuc,  tbl_tin_tuc.hinh_anh,  tbl_tin_tuc.mo_ta_ngan_gon,  tbl_tin_tuc.mo_ta_chi_tiet,  tbl_tin_tuc.ma_loai_tin_tuc,  tbl_loai_tin_tuc.ten_loai_tin_tuc"	
		, "sqlFrom"=>"FROM tbl_tin_tuc  INNER JOIN tbl_loai_tin_tuc ON tbl_tin_tuc.ma_loai_tin_tuc = tbl_loai_tin_tuc.id"	
		, "sqlWhere"=>""
		, "sqlTail"=>""
		, "groupBy"=>"0"
		, "previewOnList" => 1
		, "previewOnAdd" => 0
		, "previewOnEdit" => 0
		, "previewOnView" => 0
	);	
		$detailsTablesData["tbl_loai_tin_tuc"][$dIndex]["masterKeys"][]="id";
		$detailsTablesData["tbl_loai_tin_tuc"][$dIndex]["detailKeys"][]="ma_loai_tin_tuc";


	
// tables which are master tables for current table (detail)
$masterTablesData["tbl_loai_tin_tuc"] = array();

// -----------------end  prepare master-details data arrays ------------------------------//

require_once(getabspath("classes/sql.php"));










$proto108=array();
$proto108["m_strHead"] = "SELECT";
$proto108["m_strFieldList"] = "id,  ten_loai_tin_tuc";
$proto108["m_strFrom"] = "FROM tbl_loai_tin_tuc";
$proto108["m_strWhere"] = "";
$proto108["m_strOrderBy"] = "";
$proto108["m_strTail"] = "";
$proto109=array();
$proto109["m_sql"] = "";
$proto109["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto109["m_column"]=$obj;
$proto109["m_contained"] = array();
$proto109["m_strCase"] = "";
$proto109["m_havingmode"] = "0";
$proto109["m_inBrackets"] = "0";
$proto109["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto109);

$proto108["m_where"] = $obj;
$proto111=array();
$proto111["m_sql"] = "";
$proto111["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto111["m_column"]=$obj;
$proto111["m_contained"] = array();
$proto111["m_strCase"] = "";
$proto111["m_havingmode"] = "0";
$proto111["m_inBrackets"] = "0";
$proto111["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto111);

$proto108["m_having"] = $obj;
$proto108["m_fieldlist"] = array();
						$proto113=array();
			$obj = new SQLField(array(
	"m_strName" => "id",
	"m_strTable" => "tbl_loai_tin_tuc"
));

$proto113["m_expr"]=$obj;
$proto113["m_alias"] = "";
$obj = new SQLFieldListItem($proto113);

$proto108["m_fieldlist"][]=$obj;
						$proto115=array();
			$obj = new SQLField(array(
	"m_strName" => "ten_loai_tin_tuc",
	"m_strTable" => "tbl_loai_tin_tuc"
));

$proto115["m_expr"]=$obj;
$proto115["m_alias"] = "";
$obj = new SQLFieldListItem($proto115);

$proto108["m_fieldlist"][]=$obj;
$proto108["m_fromlist"] = array();
												$proto117=array();
$proto117["m_link"] = "SQLL_MAIN";
			$proto118=array();
$proto118["m_strName"] = "tbl_loai_tin_tuc";
$proto118["m_columns"] = array();
$proto118["m_columns"][] = "id";
$proto118["m_columns"][] = "ten_loai_tin_tuc";
$obj = new SQLTable($proto118);

$proto117["m_table"] = $obj;
$proto117["m_alias"] = "";
$proto119=array();
$proto119["m_sql"] = "";
$proto119["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto119["m_column"]=$obj;
$proto119["m_contained"] = array();
$proto119["m_strCase"] = "";
$proto119["m_havingmode"] = "0";
$proto119["m_inBrackets"] = "0";
$proto119["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto119);

$proto117["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto117);

$proto108["m_fromlist"][]=$obj;
$proto108["m_groupby"] = array();
$proto108["m_orderby"] = array();
$obj = new SQLQuery($proto108);

$queryData_tbl_loai_tin_tuc = $obj;
$tdatatbl_loai_tin_tuc[".sqlquery"] = $queryData_tbl_loai_tin_tuc;

$tableEvents["tbl_loai_tin_tuc"] = new eventsBase;

?>
